home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / overview / dtscpluslibrary / headers / environment.h < prev    next >
Encoding:
Text File  |  2000-06-23  |  2.4 KB  |  81 lines

  1. /*
  2.     File:        Environment.h
  3.  
  4.     Contains:    TEnvironment is a Gestalt wrapper class that finds out information about the environment.
  5.                   Environment.h contains the header file information for the TEnvironment class.
  6.  
  7.     Written by: Kent Sandvik    
  8.  
  9.     Copyright:    Copyright © 1992-1999 by Apple Computer, Inc., All Rights Reserved.
  10.  
  11.                 You may incorporate this Apple sample source code into your program(s) without
  12.                 restriction. This Apple sample source code has been provided "AS IS" and the
  13.                 responsibility for its operation is yours. You are not permitted to redistribute
  14.                 this Apple sample source code as "Apple sample source code" after having made
  15.                 changes. If you're going to re-distribute the source, we require that you make
  16.                 it clear in the source that the code was descended from Apple sample source
  17.                 code, but that you've made changes.
  18.  
  19.     Change History (most recent first):
  20.                 8/18/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  21.                 
  22.  
  23. */
  24. // Declare label for this header file
  25. #ifndef _ENVIRONMENT_
  26. #define _ENVIRONMENT_
  27.  
  28.  
  29. #ifndef _DTSCPLUSLIBRARY_
  30. #include "DTSCPlusLibrary.h"
  31. #endif
  32.  
  33. //    Toolbox Include Files
  34. #ifndef __GESTALTEQU__
  35. #include <GestaltEqu.h>
  36. #endif
  37.  
  38. #ifndef __OSUTILS__
  39. #include <OSUtils.h>
  40. #endif
  41.  
  42. #ifndef __TRAPS__
  43. #include <Traps.h>
  44. #endif
  45.  
  46.  
  47. // _________________________________________________________________________________________________________ //
  48. //    TEnvironment Class Interface
  49.  
  50. class TEnvironment
  51. {
  52. public:
  53.     //    CONSTRUCTORS AND DESTRUCTORS
  54.     TEnvironment();                                // constructor
  55.     ~TEnvironment();                            // destructor
  56.  
  57.     //    MAIN INTERFACE    
  58.     virtual Boolean HasAttribute(OSType attribute,
  59.                                  short theBit);    // check for any Gestalt attribute
  60.     virtual Boolean Check128k();                // check for MacOS version (128k Mac?)
  61.     virtual Boolean HasAppleEvents();            // check if AE support is available
  62.     virtual Boolean HasColorQD();                // check if Color QD is available
  63.     virtual Boolean IsSystemSeven();            // check if we run under System 7 or not
  64.     virtual Boolean TrapAvailable(short aNumber,
  65.                                   // check for traps
  66.                                   TrapType aType);
  67.     // FIELDS
  68. protected:
  69.     Boolean fResult;                            // our Gestalt result
  70.     long fLongResult;                            // used by Gestalt as well
  71. };
  72.  
  73. #endif
  74.  
  75. // _________________________________________________________________________________________________________ //
  76.  
  77. /*    Change History (most recent last):
  78.   No        Init.    Date        Comment
  79.   1            khs        11/9/92        New file
  80. */
  81.